package com.jcu.itot;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.DialogInterface.OnClickListener;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class Formula extends Activity{
	GridView gridView;
	MediaPlayer mp;
	static final String[] flash = new String[] { "flash_01","flash_02","flash_03","flash_04","flash_05"};
		@Override
		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			setContentView(R.layout.grid);
        
			
			 gridView = (GridView) findViewById(R.id.gridView1);
			 gridView.setAdapter(new FlashImageAdapter(this, flash));
          
          
			

			gridView.setOnItemClickListener(new OnItemClickListener() {
			
				@Override
				public void onItemClick(AdapterView<?> parent, View v, int position,
						long id) 
				{
            
					
					if(position==0)
					{
						
						Intent intent = new Intent(Formula.this,flsh.class);
						intent.putExtra("position", position);
         
						startActivity(intent);
											
					
					}
					
					
				}
			});
		
		
		
		


			
		
  }



}
